
<%@page import="com.blockchain.front.servlets.LoginVerify"%>
<%@page import="com.blockchain.front.servlets.trading.Trading"%>
<%@page import="com.blockchain.front.servlets.trading.index"%>
<%@page import="com.blockchain.common.enums.JyztStatus"%>
<div class="left w790" style="position: relative;">
        <div class="fast_tr clear">
            <a name="mark-trade"></a>
            <div class="ft_box" id="form-buy">
                <dl>
                    <dt class="orange"><%=languageDefine.getValue(request, "trading_buy")%></dt>
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_bestBidPrice")%>：</p>
                        <%if(b.mc_yj.compareTo(new BigDecimal(0))<=0){%><span class="orange" id="buy_best_price">-</span><%}else{%>
                        <span class="orange" id="buy_best_price"></span><%}%><%StringHelper.filterHTML(out, b.ywm_m);%>/<%StringHelper.filterHTML(out, b.ywm_s);%>
                        </dd>
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_buyPrice")%>：</p>
                        <input type="text" id="buy_price" name="price" autocomplete="off" aria-autocomplete="none"
                               placeholder='<%=languageDefine.getValue(request, "trading_unitPrice")%>' value=""  onkeyup="my_je_zj();mr_max_km();this.value=this.value.replace(/[^0-9.]/g,'');value=value.replace(/\.\d{6,}$/,value.substr(value.indexOf('.'),7));" >
                    </dd>
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_theLargestToBuy")%>：</p>
                        <span class="col_333" id="buy_max" title='<%=languageDefine.getValue(request, "trading_full")%>'></span><%StringHelper.filterHTML(out, b.ywm_s);%></dd>
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_buyRatio")%>：</p>
                        <div class="slider_wrap">
                            <div class="sliderbox">
                                <a href="javascript:void(0)" onclick="s4('<%=1%>');">1/4</a>
                                <a href="javascript:void(0)" onclick="s3('<%=1%>');">1/3</a>
                                <a href="javascript:void(0)" onclick="s2('<%=1%>');">1/2</a>
                                <a href="javascript:void(0)" onclick="s1('<%=1%>');"><%=languageDefine.getValue(request, "trading_all")%></a>
                            </div>
                        </div>
                    </dd>
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_buyQuantity")%>：</p>
                        <input type="text" id="buy_num" name="num" autocomplete="off" aria-autocomplete="none" onkeyup="zj('<%=1%>');this.value=this.value.replace(/[^0-9.]/g,'');">
                    </dd>
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_totalPrice")%>：</p>
                        <span class="col_333" id="zj_mum"></span><%StringHelper.filterHTML(out, b.ywm_m);%></dd>
                    <dd>
                       <p><%=languageDefine.getValue(request, "trading_fee")%>：</p>
                        <%=Formater.formatAmount_(b.mr_sxfl.multiply(new BigDecimal(100)),3)%>%
                    </dd>
                    <%if(!StringHelper.isEmpty(mmsrsz)&&mmsrsz.equals(JymmType.MBJY.toString())){%>
                    <dd class="pwdtrade">
                        <p><%=languageDefine.getValue(request, "trading_tradePassword")%>：</p>
                        <input id="buy_paypassword" name="pwtrade" type="password" autocomplete="off" 
                               aria-autocomplete="none"> <span  class="settings"></span>
                    </dd>
                    <%}%>
                </dl>
                <div>
                    <div class="trader_btn">
                        <div class="tan_btn" id="tm-buy"></div>
                         <%if (blockchainSession == null || !blockchainSession.isAuthenticated()) {%>
                          <input type="button" value='<%=languageDefine.getValue(request, "trading_buy")%>' onclick="loginpop('<%=controller.getURI(request, LoginVerify.class)%>');">
                          <%}else{%>
                        <input type="button" value='<%=languageDefine.getValue(request, "trading_buy")%>' onclick="tradeadd_buy();">
                        <%}%>
                    </div>
                </div>
             </div> 
            <div class="ft_box nobr" id="form-sell" >
             <input type="hidden" name="type" value="<%=JyztStatus.MC%>">
             <input type="hidden" name="scid" value="<%=scid%>">
                <dl>
                    <dt class="green"><%=languageDefine.getValue(request, "trading_sell")%></dt>
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_bestSellingPrice")%>：</p>
                       <%if(b.mr_yj.compareTo(new BigDecimal(0))<=0){%><span class="orange" id="buy_best_price">-</span><%}else{%>
                       <span class="orange" id="sell_best_price"></span><%}%><%StringHelper.filterHTML(out, b.ywm_s);%>/<%StringHelper.filterHTML(out, b.ywm_m);%>
                        </dd>
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_sellPrice")%>：</p>
                        <input type="text" id="sell_price" autocomplete="off" aria-autocomplete="none" name="price"
                               placeholder='<%=languageDefine.getValue(request, "trading_unitPrice")%>'  value=""  onkeyup="mc_je_zj();this.value=this.value.replace(/[^0-9.]/g,'');value=value.replace(/\.\d{6,}$/,value.substr(value.indexOf('.'),7));" />
                    </dd>
                    
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_theLargestToSell")%>：</p>
                        <span id="sell_max" class="col_333">
                        <em id="zdkm"></em>
                        <%StringHelper.filterHTML(out, b.ywm_s);%>
                        </span></dd>
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_sellRatio")%>：</p>
                        <div class="slider_wrap">
                            <div class="sliderbox">
                                <a href="javascript:void(0)" onclick="s4('<%=2%>');">1/4</a>
                                <a href="javascript:void(0)" onclick="s3('<%=2%>');">1/3</a>
                                <a href="javascript:void(0)" onclick="s2('<%=2%>');">1/2</a>
                                <a href="javascript:void(0)" onclick="s1('<%=2%>');"><%=languageDefine.getValue(request, "trading_all")%></a>
                            </div>
                        </div>
                    </dd>
                    <dd> 
                        <p><%=languageDefine.getValue(request, "trading_sellQuantity")%>：</p>
                        <input type="text" id="sell_num" name="num" autocomplete="off" aria-autocomplete="none" onkeyup="zj('<%=2%>>');this.value=this.value.replace(/[^0-9.]/g,'');" >
                    </dd>
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_totalPrice")%>：</p>
                        <span class="col_333" id="zj_sell_mum"></span><%StringHelper.filterHTML(out, b.ywm_m);%></dd>
                    <dd>
                        <p><%=languageDefine.getValue(request, "trading_fee")%>：</p>
                        <%=Formater.formatAmount_(b.mc_sxfl.multiply(new BigDecimal(100)),3)%>%
                    </dd>
                     <%  if(!StringHelper.isEmpty(mmsrsz)&&mmsrsz.equals(JymmType.MBJY.toString())){%> 
                    <dd class="pwdtrade">
                        <p><%=languageDefine.getValue(request, "trading_tradePassword")%>：</p>
                        <input id="sell_paypassword" name="pwtrade" type="password" autocomplete="off"
                               aria-autocomplete="none"> <span  class="settings"></span>
                    </dd>
                     <%}%> 
                </dl>
                <div>
                    <div class="trader_btn">
                        <div class="tan_btn" id="tm-sell"></div>
                         <%if (blockchainSession == null || !blockchainSession.isAuthenticated()) {%>
                         <input class="bg_green" type="button" value='<%=languageDefine.getValue(request, "trading_sell")%>' onclick="loginpop('<%=controller.getURI(request, LoginVerify.class)%>');">
                          <%}else{%>
                        <input class="bg_green" type="button" value='<%=languageDefine.getValue(request, "trading_sell")%>' onclick="tradeadd_sell();">
                   		 <%}%>
                    </div>
                </div>
            </div>
        </div>
    </div>